package com.bdcom.autotest;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.alibaba.fastjson.JSONObject;
import com.bdcom.autotest.util.CUtil;

public class BootThread extends Thread {

	private static Logger log = LoggerFactory.getLogger(BootThread.class);
	
	public BootThread() {
		
	}
	
	
	@Override
	public void run() {
		
		
//		while(true) {
//
//
//			try {
//				keepAlive();
//				Thread.sleep(60 * 1000);
//			} catch (InterruptedException e) {
//			}
//
//		}
		
	}
	
	
public void keepAlive() {
		
		JSONObject args = new JSONObject();
		args.put("sid", CUtil.SESSIONID);
		
		String reqUrl = "/keepalive2";
		JSONObject httpPost = CUtil.httpPost(args, reqUrl);
		
		String res = httpPost.getString(CUtil.RES);
		
		log.info(    "keepalive result : " +  res  );
		
	}
	
	
}
